<div class="content-wrapper">
    <?php
    $form = $this->form;
    $form->prepare();

    ?>
    <?php echo $this->form()->openTag($form); ?>
    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>

        <h1 class="pull-right" id="dbshop-menu-top">
            <a href="<?php echo $this->url('sales-service', [], ['query' => $this->queryData]);?>" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> <?php echo $this->translate('返回列表'); ?></a>
            <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> <?php echo $this->translate('保存'); ?></button>
            <?php echo $this->HelpUrl('salesService'); ?>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo $this->translate('售后审核'); ?></h3>
                    </div>

                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('订单编号'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static"><?php echo $this->returnInfo->getOrderSn(); ?></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('商品名称'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static">
                                    <img src="<?php echo $this->goodsHelper()->goodsImage($this->orderGoodsInfo[0]->getGoodsImage()); ?>" class="img-thumbnail" style="width: 50px;height: 50px;">
                                    <?php echo $this->orderGoodsInfo[0]->getGoodsName(); ?> <?php if (!empty($this->orderGoodsInfo[0]->getInSpecGoodsStr())) echo '('.$this->orderGoodsInfo[0]->getInSpecGoodsStr().')'; ?>
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('购物金额'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static"><?php echo $this->orderGoodsInfo[0]->getGoodsPrice() . ' x ' . $this->orderGoodsInfo[0]->getBuyNum() . ' = ' . $this->orderGoodsInfo[0]->getGoodsAmount() . ' ('.$this->orderGoodsInfo['currencySymbol'].')'; ?></p>
                            </div>
                        </div>
                        <?php if ($this->returnInfo->getReturnType() != 3) { ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('申请退款金额'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static text-red"><?php echo $this->orderGoodsInfo['currencySymbol'] . $this->returnInfo->getReturnAmount(); ?></p>
                            </div>
                        </div>
                        <?php } ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('申请时间'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static"><?php echo $this->shopDateFormat()->orderGoodsReturnTime($this->returnInfo->getAddTime()); ?></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('售后类型'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static"><?php echo $this->salesHelper()->getOrderGoodsReturnType($this->returnInfo->getReturnType()); ?></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('申请售后原因'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static"><?php echo $this->escapeHtml($this->returnInfo->getReturnReason()); ?></p>
                            </div>
                        </div>
                        <?php if ($this->returnInfo->getReturnType() != 3) { ?>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><?php echo $this->translate('退款方式'); ?></label>
                                <div class="col-sm-5">
                                    <p class="form-control-static">
                                        <?php echo $this->salesHelper()->getOrderGoodsReturnPayType($this->returnInfo->getRefundPayType()); ?>
                                        <?php if ($this->returnInfo->getRefundPayType() == 'otherPay') { ?>
                                            <small class="text-bold text-red">(<?php echo $this->translate('请手动将金额退款至相关账户'); ?>)</small>
                                        <?php } ?>
                                    </p>
                                </div>
                            </div>
                            <?php if ($this->returnInfo->getRefundPayType() == 'otherPay') { ?>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('支付名称(开户行)'); ?></label>
                                    <div class="col-sm-5">
                                        <p class="form-control-static"><?php echo $this->escapeHtml($this->returnInfo->getRefundPayName()); ?></p>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('姓名'); ?></label>
                                    <div class="col-sm-5">
                                        <p class="form-control-static"><?php echo $this->escapeHtml($this->returnInfo->getRefundUser()); ?></p>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><?php echo $this->translate('收款账号(卡号)'); ?></label>
                                    <div class="col-sm-5">
                                        <p class="form-control-static"><?php echo $this->escapeHtml($this->returnInfo->getRefundAccount()); ?></p>
                                    </div>
                                </div>
                            <?php } ?>
                        <?php } ?>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('申请说明'); ?></label>
                            <div class="col-sm-5">
                                <p class="form-control-static"><?php echo nl2br($this->escapeHtml($this->returnInfo->getReturnInfo())); ?></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('审核状态'); ?></label>
                            <div class="col-sm-2">
                                <?php echo $this->formElement($form->get('returnState')); ?>
                                <?php echo $this->formElementErrors($form->get('returnState'), ['class'=>'error-message']); ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><?php echo $this->translate('审核说明'); ?></label>
                            <div class="col-sm-5">
                                <?php echo $this->formElement($form->get('reviewInfo')); ?>
                                <?php echo $this->formElementErrors($form->get('reviewInfo'), ['class'=>'error-message']); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </section>
    <?php echo $this->form()->closeTag(); ?>

</div>
